package com.changli02.stringmore;

import org.junit.Test;

public class interview {
    @Test
    public void test() {
        String str = null;
        StringBuffer sb = new StringBuffer();
        sb.append(str);
        System.out.println(sb.length()); // 4
        System.out.println(str); // "null "


        StringBuffer sb1 = new StringBuffer(str);
        System.out.println(str); //NullPointerException

    }
}
